<link href="__PUBLIC__/plugins/fitui/tablegrid.css" rel="stylesheet">
<link href="__PUBLIC__/plugins/huploadify/Huploadify.css" rel="stylesheet">
<link href="__PUBLIC__/plugins/select2/4.0.0/css/select2.min.css" rel="stylesheet">
<script src="__PUBLIC__/plugins/select2/4.0.0/js/select2.js"></script>
<script src="__PUBLIC__/plugins/select2/4.0.0/js/i18n/zh-CN.js"></script>
<script src="__PUBLIC__/plugins/huploadify/jquery.Huploadify.js"></script>
<script src="__PUBLIC__/js/mp/format.js"></script>
<script src="__PUBLIC__/plugins/fitui/tablegrid.js"></script>
<script src="__PUBLIC__/js/mp/wx_event_vote_player.js"></script>
<script>
var Param = <?php echo json_encode( $param ) ?> ;
$(function(){
  WxEventVotePlayer.init(<?php echo json_encode( $config ) ?>);
});

</script>

<div class="page-content">
  <ol class="breadcrumb">
    <li><a href="<?php echo $home_url ?>">首页</a></li>
    <li class="active"><?php echo $module_name ?></li>
  </ol>
  <div class="page-content-inner"> 
    <!-- read_modal -->
    <div class="portlet blue" id="read_modal"> 
      <!-- portlet-title -->
      <div class="portlet-title">
        <div class="caption"> <i class="fa fa-comments "></i> <?php echo $module_name ?> </div>
        <div class="tools">
          <?php if ( $opt_data == 1 || in_array( '添加' , $opt_data ) ) : ?>
          <a href="#" class="toolbtn add load_add_modal_btn" data-toggle="tooltip" data-placement="top" title="新增"></a>
          <?php endif ; ?>
        </div>
      </div>
      <!-- end portlet-title -->
      <div class="portlet-body "> 
        <!-- table grid -->
        <div class="table-responsive">
          <table id="data_table" class="table table-striped table-hover table-condensed">
            <thead>
              <tr>
                <th width="60" data-field="id">ID</th>
                
                <th width="120" data-field="truename">真名</th>
                <th width="120" data-field="nickname">昵称</th>
                <th width="120" data-field="vote_count"  >票数</th>
                <th width="60" data-field="user_id"  >用户ID</th>
                <th width="120" data-field="status" data-formatter="format_status" >状态</th>
                <th width="160" data-field="create_time"  >报名时间</th>
                <th width="80" data-formatter="opt_attach"></th>
                <?php if ( $opt_data == 1 || in_array( '编辑' , $opt_data ) ) : ?>
                <th width="80" data-formatter="opt_edit"></th>
                <?php endif ; ?>
                <?php if ( $opt_data == 1 || in_array( '删除' , $opt_data ) ) : ?>
                <th width="80" data-formatter="opt_delete"></th>
                <?php endif ; ?>
                <th>&nbsp;</th>
              </tr>
            </thead>
          </table>
        </div>
        <!-- end table --> 
        <div class="row" style="text-align:center; margin-top:60px;">
          <button type="button" class="btn btn-lg btn-default" onClick="javascript:history.go(-1)"><i class="fa fa-arrow-left"></i> 返回</button>
        </div>
      </div>
    </div>
    <!-- end portlet read_modal --> 
    
    <!-- add_edit_modal  -->
    <div class="portlet" id="add_edit_modal" style="display:none;">
      <div class="portlet-title">
        <div class="caption"> <i class="fa fa-cogs"></i> <span id="action_label"></span> <?php echo $module_name ?> </div>
      </div>
      <div class="portlet-body ">
        <form id="submit_form" class="form-horizontal">
          <div class="form-group">
            <label class="col-sm-3 control-label">真名</label>
            <div class="col-sm-7">
              <input name="truename" placeholder="真名" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">昵称</label>
            <div class="col-sm-7">
              <input name="nickname" placeholder="昵称" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">性别</label>
            <div class="col-sm-7">
              <?php echo form_radios('sex' , $param['sex']) ?>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">年龄</label>
            <div class="col-sm-7">
              <input name="age" placeholder="年龄" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">关联用户</label>
            <div class="col-sm-7">
              <select name="user_id" id="user_id" class="form-control" style="width:100%" ></select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">图标</label>
            <div class="col-sm-7">
              <div id="icon_preview" class="img-preview"></div>
              <div id="icon_upload_btn"></div>
              <input name="icon" placeholder="图标" type="hidden" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">票数</label>
            <div class="col-sm-7">
              <input name="vote_count" placeholder="票数" type="text" class="form-control" >
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">参数人简介</label>
            <div class="col-sm-7">
              <textarea name="desc" placeholder="参数人简介" class="form-control" ></textarea>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">参数人简介1</label>
            <div class="col-sm-7">
              <textarea name="desc1" placeholder="参数人简介1" class="form-control" ></textarea>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">参数人简介2</label>
            <div class="col-sm-7">
              <textarea name="desc1" placeholder="参数人简介1" class="form-control" ></textarea>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-3 control-label">状态</label>
            <div class="col-sm-7">
              <?php echo form_radios('status' , $param['status']) ?>
            </div>
          </div>
          <hr>
          <div class="row">
            <div class="col-md-12" style="text-align:center">
              <button class="btn btn-default btn-lg " id="add_edit_close_btn" type="button"><i class="fa fa-arrow-left"></i> 返回</button>
              <button class="btn btn-danger btn-lg " id="submit_btn" type="button"><i class="fa fa-edit"></i> 提交</button>
            </div>
          </div>
        </form>
      </div>
    </div>
    <!-- end portlet add_edit_modal --> 
  </div>
  <!-- end page-content-inner --> 
</div>
